<?php namespace Modules\Core\Cms\Controller\Admin;

use Modules\Core\Cms\Model\Page;

class PageController extends \Core\Myapp\Controller\AdminController
{
    protected function initEditForm()
    {

    }

    protected function initGid()
    {

    }

    public function listAction()
    {
        $this->getView()->addButton('Add New', 'add', 'window.location=\'{cms/page/create}\'');
        $this->getView()->setTitle('List Cms Pages');
        $this->getView()->setLayout('one-column')->render();
    }

    public function createAction()
    {
        $page = new Page();
        $page = $page->load(60);
        // init Edit Form
        $form = $this->getView()->getForm();
        $formHelper = $this->getInstance('Modules\Core\Cms\Helper\Admin\Edit\Form');
        $formHelper->initForm($form, array());
        $this->getView()->setLayout('one-column')->setContent($form, 'edit/form.phtml')->render();
    }

    public function editAction()
    {

    }

    public function saveAction()
    {

    }
}